#ifndef CAR_H_INCLUDED
#define CAR_H_INCLUDED
#include <allegro.h>
#include <stdio.h>

// 1.Different structures 

// a. Car structure

/**
*@brief Car
*@details The CAR is defined by two position in 2D space; x and y and a bitmap
*named car.
*@todo Add everything that concerns the car itself
*/
struct CAR 
	{
	int x;
	int y;
	BITMAP *car;	
	};
typedef struct CAR CAR;


// b. Principale and collision background structure

/**
*@brief Collision and principale background
*@details Puts the two necessary backgrounds in one structure
*@todo Add everything that concerns the two backgrounds as positions and bitmaps
*/
struct BACKG 
	{
	int backg_x ;
	int backg_y ;
	int backgc_x;
	BITMAP *backgroundprincipale ;
	BITMAP *backgroundCollision ;
	};
typedef struct BACKG BACKG;


// 2. Different functions of the car-movement
int get_pixel(BITMAP* Buffer,int x,int y);
void moveup (BACKG *b, CAR *c, BITMAP *buffer, BITMAP * image);
void movedown (BACKG *b, CAR *c, BITMAP *buffer, BITMAP * image);
void moveright (BACKG *b, CAR *c, BITMAP *buffer, BITMAP * image);
void moveleft (BACKG *b, CAR *c, BITMAP *buffer, BITMAP * image);
void soundm(sound);

#endif // CAR_H_INCLUDED

